package de.gwtprime.client.login;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

/**
 * Represents the login-box
 * @author jan
 *
 */
public class RegisterContainer extends Composite {

	interface MyUiBinder extends UiBinder<Widget, RegisterContainer> {}
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);

	@UiField TextBox nameInput;
	@UiField Button sendRegistrationBtn;
	@UiField Button cancelRegistrationBtn;
	@UiField PasswordTextBox passwordInput;
	@UiField PasswordTextBox passwordInputRepeat;
	DialogBox dialog;
	
	public RegisterContainer(DialogBox dialog) {
		// sets listBox
		initWidget(uiBinder.createAndBindUi(this));
		this.dialog = dialog;

	}
	
	@UiHandler("cancelRegistrationBtn")
	public void closePopup(ClickEvent e){
		dialog.hide();
	}

	
}
